import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app/main02.dart';

/**
 * 引入本地图片
 */
main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo'),
        ),
        body: HomeContent(),
      ),
    );
  }
}

class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: EdgeInsets.all(10),
      children: <Widget>[
        ListTile(
          leading: Icon(
            Icons.settings,
            size: 40,
          ),
          title: Text("nihaodfdfd"),
          subtitle: Text(
            "如上图所示，因为assets：是属于flutter下的项，所以assets：前面所留的空格必须是和flutter的其他项对齐，这样才能正确加载出图片。",
            style: TextStyle(
              fontSize: 20,
              color: Colors.red,
            ),
          ),
        ),
        ListTile(
          trailing: Icon(Icons.home),
          title: Text("nihao2dfdfd"),
          subtitle: Text(
              "如上图所示，因为assets：是属于flutter下的项，所以assets：前面所留的空格必须是和flutter的其他项对齐，这样才能正确加载出图片。"),
        ),
        ListTile(
          leading: Image.network(
              "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
          title: Text("nihaodfdfd"),
          subtitle: Text(
              "如上图所示，因为assets：是属于flutter下的项，所以assets：前面所留的空格必须是和flutter的其他项对齐，这样才能正确加载出图片。"),
          trailing: Image.network(
              "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
        ),
        ListTile(
          title: Text("nihaodfdfd"),
          subtitle: Text(
              "如上图所示，因为assets：是属于flutter下的项，所以assets：前面所留的空格必须是和flutter的其他项对齐，这样才能正确加载出图片。"),
        ),
      ],
    );
  }
}
